package com.tony.multipledatasources.service.impl;

import com.tony.multipledatasources.entity.Student;
import com.tony.multipledatasources.mapper.mysql.StudentMapper;
import com.tony.multipledatasources.service.StudentService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Xuxiaoyu
 * @Description
 * @createTime 2024/4/12 下午2:44:20
 */
@Service(value = "studentService")
public class StudentServiceImpl implements StudentService {

    @Resource
    private StudentMapper studentMapper;

    @Override
    public List<Map<String, Object>> getAllStudentsWithMapFromMysql() {
        return studentMapper.getAllStudentsWithMap();
    }

    @Override
    public List<Student> getAllStudentsWithBeanFromMysql() {
        return studentMapper.getAllStudentsWithBean();
    }

}
